﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using System.Linq;
using System.Text;
using KduneeShaders;
using Microsoft.Xna.Framework;

namespace ShaderApp
{
    class WaterExample : ShaderExample
    {
        override internal void LoadContent(ContentManager content)
        {
            Model model = content.Load<Model>(@"Content\Models\plane_s1");
            
            Texture2D water1 = content.Load<Texture2D>(@"Content\Textures\water1");
            Texture2D water2 = content.Load<Texture2D>(@"Content\Textures\water2");

            WaterShader newWater = new WaterShader(content, water1, water2);

            newWater.Parameters["lightAmbient"].SetValue(new Vector4(1.0f, 1.0f, 1.0f, 1.0f));
            newWater.MaterialAmbient = new Vector4(1.0f, 1.0f, 1.0f, 1.0f);

            objects.Add(new ShaderedObject(newWater, model));

            Model model2 = content.Load<Model>(@"Content\Models\torus_s12");

            ShaderedObject helperObject = new ShaderedObject(newWater, model2);
            objects.Add(helperObject);
            helperObject.Obj2World *= Matrix.CreateTranslation(new Vector3(200, 0, 0));
        }
    }
}
